package com.zxy.health.controller;

import com.zxy.health.service.ManagerService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

@Controller
public class LoginController {

    @Autowired
    ManagerService managerService;

    @RequestMapping("/main")
    public String toMain(){
        return "main";
    }
    @RequestMapping("/index")
    public String index(@RequestParam("username") String username,
                        @RequestParam("password") String password) {
        return managerService.login(username,password);
    }

}
